<?php

namespace app\controller\web;

use app\service\EmailLogTableService;
use app\service\LanguageTypeService;
use app\validate\EmailLogTableValidate;
use app\validate\PageValidate;
use share\utils\Helper;

class EmailLogTableController extends WebBaseController{

    public function initValidate(){        
        $this->validate = new EmailLogTableValidate();
    }

    /**
     * 列表 搜索
     */
    public function list_action(){        
        $page = $this->check('pageInfo',null,(new PageValidate()));
        $input = $this->check();       
        $data = EmailLogTableService::getListInfo($input,$page);
        $data = Helper::arrayListUnderscoreToCamelKey($data);
        $total = EmailLogTableService::getListCountInfo($input);
        return self::ok(self::formatPageData($page,$total,$data));
    }
  
}